<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setAttribute("path", request.getContextPath());
%>
<script type="text/javascript">
$(function(){
	common.ajaxQuery("${root}/mst/pro/list");
});

function deleteById( id ){
	if(confirm("确定删除此产品!")){
		var url = "${root}/mst/pro/delete/" + id;
		common.ajaxSubmit( url ,"","删除产品失败,请重试!","",'common.ajaxQuery("${root}/mst/pro/list")');
	}
}

</script>
<jsp:include page="../../base/master_js.jsp"></jsp:include>
<form class="form-horizontal" id="queryForm" role="form">
	<input name="orderName" value="name" type="hidden">
	<table class="table table-hover">
		<tr>
			<th>机型:</th>
			<td><input type="text" class="input-xlarge" name="name"/></td>
			<th>产品线:</th>
			<td>
				<select id="firstCat" name="firstCat" class="input-xlarge" onchange="firstCatChange(this,'secondCat')">
					<option value=""></option>
					<c:forEach var="item" items="${firstCats}">
						<option value="${item.id }"><c:out value="${item.name }"/></option>
					</c:forEach>
				</select>
			</td>
			<th>品牌:</th>
			<td>
				<select id="secondCat" name="secondCat" class="input-xlarge" >
				</select>
			</td>
		</tr>
	</table>
	 <div class="form-actions text-center">
		      <button type="button" class="btn btn-primary" onclick="common.ajaxQuery('${root}/mst/pro/list')">查询</button>
		      <a  class="btn btn-success" href="${root}/mst/pro/update/init?h=h03&n=n03" target="_blank">新增</a>
	 </div>
</form>
<div class="table-responsive">
<table class="table table-striped table-bordered">
	<thead>
		<tr >
			<th class="span2 text-center">机型</th>
			<th class="span2 text-center">产品线</th>
			<th class="text-center">品牌</th>
			<th class="span3 text-center">保修期限(月)</th>
			<th class="span2 text-center">更新时间</th>
			<th class="span4 text-center">操作</th>
		</tr>
	</thead>
	<tbody id="dataList">
	</tbody>
</table>
</div>

